<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <style>
        div{
            width: 800px;
            height: 500px;
            border: 1px solid red;
            /*默认是平铺*/
            background-image: url("./image/bg.png");
        }
        .div1{
            /*水平铺满*/
            background-repeat: repeat-x;
        }
        .div2{
            /*竖直铺满*/
            background-repeat: repeat-y;
        }
        .div3{
            /*图片是多大就只是铺一张*/
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>
<div class="div1">div1</div>
<div class="div2">div2</div>
<div class="div3">div3</div>
</body>
</html>